/**   
 * @Title: CodeFile.java 
 * @Package: com.rename.icode.model 
 * @Description: Administrator版权所有
 * @author Administrator  
 * @date 2015-3-9 下午1:11:19 
 * @version  
 */

package com.rename.icode.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;

/**
 * @Description 代码文件实体类
 * @author Administrator
 * @date 2015-3-9 下午1:11:19
 * @version V1.0
 */

public class CodeFile implements Parcelable {

	private String id;
	private String name;
	private String type;
	private String detail;
	private String path;
	private int orderNumber;// 在相同类型的文件中的顺序

	public CodeFile() {
	}

	public CodeFile(String id, String name, String type, String detail) {
		this.id = id;
		this.name = name;
		this.type = type;
		this.detail = detail;
	}

	public CodeFile(Parcel in) {
		id = in.readString();
		name = in.readString();
		type = in.readString();
		detail = in.readString();
		path = in.readString();
		orderNumber = in.readInt();
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public int getOrderNumber() {
		return orderNumber;
	}

	public void setOrderNumber(int orderNumber) {
		this.orderNumber = orderNumber;
	}

	@Override
	public String toString() {
		return "CodeFile [id=" + id + ", name=" + name + ", type=" + type
				+ ", detail=" + detail + ", path=" + path + ", orderNumber="
				+ orderNumber + "]";
	}

	/**
	 * Description
	 * 
	 * @return
	 * @see android.os.Parcelable#describeContents()
	 */

	@Override
	public int describeContents() {
		return 0;
	}

	/**
	 * Description
	 * 
	 * @param dest
	 * @param flags
	 * @see android.os.Parcelable#writeToParcel(android.os.Parcel, int)
	 */

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(id);
		dest.writeString(name);
		dest.writeString(type);
		dest.writeString(detail);
		dest.writeString(path);
		dest.writeInt(orderNumber);
	}

	public static final Parcelable.Creator<CodeFile> CREATOR = new Creator<CodeFile>() {
		@Override
		public CodeFile[] newArray(int size) {
			return new CodeFile[size];
		}

		@Override
		public CodeFile createFromParcel(Parcel in) {
			return new CodeFile(in);
		}
	};

}
